using Web.Model;

namespace Web.DataAccess.Mappings
{
	public class PhotoMapping : EntityMapping<Photo>
	{
		public PhotoMapping()
		{
			Map(x => x.XlSizeUrl);
			Map(x => x.ResourceUrl);
			Map(x => x.Description);
			Map(x => x.EditResourceUrl);
			Map(x => x.Title);
			Map(x => x.OriginalSizeUrl);
            ReferencesAny(x => x.Story)
                .EntityTypeColumn("StoryType")
                .EntityIdentifierColumn("StoryId")
                .IdentityType(x => x.Id)
                .MetaType<string>();
		}
	}
}